package com.hospital.warehouse.outstock.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hospital.warehouse.drugdicts.entity.Drugdicts;
import com.hospital.warehouse.instock.entity.Instock;
import com.hospital.warehouse.storehouse.entity.Storehouse;
import com.hospital.warehouse.sys_user.entity.Sys_user;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author Mr. YR
 * @since 2020-04-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("outstock")
public class Outstock extends Model<Outstock> {

	private static final long serialVersionUID = 1L;

	@TableId(value = "os_id", type = IdType.AUTO)
	private Integer os_id;
	
	@TableField("os_is_id")
	private Integer os_is_id;
	@TableField(exist = false)
	private Instock instock;
	
	@TableField(exist = false)
	private Drugdicts drug;
	@TableField(exist = false)
	private Storehouse storehouse;

	@TableField("os_num")
	private Integer os_num;
	@TableField(exist = false)
	private Integer os_num_min;
	@TableField(exist = false)
	private Integer os_num_max;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField("os_outtime")
	private Date os_outtime;
	@TableField(exist = false)
	private String os_outtime_interval;
	@TableField(exist = false)
	private Date os_outtime_min;
	@TableField(exist = false)
	private Date os_outtime_max;

	@TableField("os_confirmid")
	private Integer os_confirmid;
	@TableField(exist = false)
	private Sys_user confirm;
	
	@TableField("os_pharmacyid")
	private Integer os_pharmacyid;

	@TableField("flag")
	private Integer flag;

	@Override
	protected Serializable pkVal() {
		return this.os_id;
	}

}
